/* ================= 视觉设计系统 ================= */

/* 基础元素 */
QWidget {
/*    background-color: #FCFCFC;*/
    color: #2C3E50;
    font-family: "SF Pro Display", "Segoe UI", "Roboto", sans-serif;
    font-size: 12px;
}

/* ================= 主界面布局元素 ================= */

/* 主窗口 */
QMainWindow {
    background-color: #F8F9FA;
}

/* 菜单栏 */
QMenuBar {
    background-color: #2B3A4A;
    color: #FFFFFF;
    border: none;
    min-height: 24px;
    padding: 1px 4px;
}

QMenuBar::item {
    background: transparent;
    padding: 4px 8px;
    border-radius: 2px;
    margin-right: 2px;
}

QMenuBar::item:selected {
    background-color: rgba(255, 255, 255, 0.1);
}

QMenuBar::item:pressed {
    background-color: rgba(255, 255, 255, 0.15);
}

/* 菜单 */
QMenu {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    padding: 4px 0px;
}

QMenu::item {
    padding: 5px 20px 5px 12px;
    color: #2C3E50;
    width: 100px;
}

QMenu::item:selected {
    background-color: #ECF6FF;
    color: #3367D6;
}

QMenu::item:disabled {
    background-color: #F8F9FA;
    color: #B3C0CF;
}


QMenu::separator {
    height: 1px;
    background-color: #E0E6ED;
    margin: 3px 0px;
}

/* 工具栏 */
QToolBar {
    background-color: #FFFFFF;
    border-bottom: 1px solid #E0E6ED;
    spacing: 4px;
    padding: 2px 4px;
    min-height: 32px;
}

QToolBar::separator {
    width: 1px;
    background-color: #E0E6ED;
    margin: 0px 4px;
}

QToolButton {
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 3px;
}

QToolButton:hover {
    background-color: #ECF6FF;
}

QToolButton:pressed {
    background-color: #D6E4FF;
}

QToolButton:checked {
    background-color: #3367D6;
    color: #FFFFFF;
}

/* 状态栏 */
QStatusBar {
    background-color: #F8F9FA;
    border-top: 1px solid #E0E6ED;
    min-height: 20px;
    color: #5A6A7E;
}

QStatusBar::item {
    border: none;
}

/* 分隔线 */
QFrame[frameShape="VLine"] {
    color: #E0E6ED;
    width: 1px;
}

QFrame[frameShape="HLine"] {
    color: #E0E6ED;
    height: 1px;
}

/* ================= 基础控件样式 ================= */

/* 按钮 */
QPushButton {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    color: #2C3E50;
    padding: 4px 12px;
    min-height: 24px;
    font-weight: 500;
}

QPushButton:hover {
    background-color: #F8F9FA;
    border-color: #3367D6;
    color: #3367D6;
}

QPushButton:pressed {
    background-color: #ECF6FF;
}

QPushButton:disabled {
    background-color: #F8F9FA;
    border-color: #E0E6ED;
    color: #B3C0CF;
}

QPushButton:focus {
    outline: none;
}

/* 主要按钮 */
QPushButton[type="primary"] {
    background-color: #3367D6;
    border-color: #3367D6;
    color: #FFFFFF;
}

QPushButton[type="primary"]:hover {
    background-color: #4285F4;
    border-color: #4285F4;
}

QPushButton[type="primary"]:pressed {
    background-color: #2A56C6;
    border-color: #2A56C6;
}

QPushButton[type="primary"]:disabled {
    background-color: #A6C8FF;
    border-color: #A6C8FF;
    color: #FFFFFF;
}

/* 危险按钮 */
QPushButton[type="danger"] {
    background-color: #FFFFFF;
    border-color: #EA4335;
    color: #EA4335;
}

QPushButton[type="danger"]:hover {
    background-color: #EA4335;
    color: #FFFFFF;
}

QPushButton[type="danger"]:pressed {
    background-color: #D32F2F;
    border-color: #D32F2F;
    color: #FFFFFF;
}

/* 链接按钮 */
QPushButton[type="link"] {
    background-color: transparent;
    border: none;
    color: #3367D6;
    padding: 0px;
    min-height: 20px;
    font-weight: 400;
}

QPushButton[type="link"]:hover {
    color: #4285F4;
    text-decoration: underline;
}

QPushButton[type="link"]:pressed {
    color: #2A56C6;
}

/* 输入框 */
QLineEdit, QTextEdit, QPlainTextEdit {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    padding: 4px 8px;
    color: #2C3E50;
    selection-background-color: #D6E4FF;
    selection-color: #3367D6;
}

QLineEdit:hover, QTextEdit:hover, QPlainTextEdit:hover {
    border-color: #3367D6;
}

QLineEdit:focus, QTextEdit:focus, QPlainTextEdit:focus {
    border-color: #3367D6;
    border-width: 2px;
    padding: 3px 7px; /* 补偿边框增加的宽度 */
}

QLineEdit:disabled, QTextEdit:disabled, QPlainTextEdit:disabled {
    background-color: #F8F9FA;
    color: #B3C0CF;
    border-color: #E0E6ED;
}

QLineEdit:read-only, QTextEdit:read-only, QPlainTextEdit:read-only {
    background-color: #F8F9FA;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    padding: 4px 8px;
}

/* 数字输入框 */
QSpinBox, QDoubleSpinBox {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    padding: 4px 8px;
    color: #2C3E50;
    selection-background-color: #D6E4FF;
    selection-color: #3367D6;
}

QSpinBox:hover, QDoubleSpinBox:hover {
    border-color: #3367D6;
}

QSpinBox:focus, QDoubleSpinBox:focus {
    border-color: #3367D6;
    border-width: 2px;
    padding: 3px 7px; /* 补偿边框增加的宽度 */
}

/* 数字输入框上下按钮 */
QSpinBox::up-button, QDoubleSpinBox::up-button {
    subcontrol-origin: border;
    subcontrol-position: top right;
    width: 16px;
    border-left: 1px solid #E0E6ED;
    border-bottom: 1px solid #E0E6ED;
    border-top-right-radius: 3px;
    background-color: #F8F9FA;
}

QSpinBox::down-button, QDoubleSpinBox::down-button {
    subcontrol-origin: border;
    subcontrol-position: bottom right;
    width: 16px;
    border-left: 1px solid #E0E6ED;
    border-top-right-radius: 0;
    border-bottom-right-radius: 3px;
    background-color: #F8F9FA;
}

QSpinBox::up-button:hover, QDoubleSpinBox::up-button:hover,
QSpinBox::down-button:hover, QDoubleSpinBox::down-button:hover {
    background-color: #ECF6FF;
}

QSpinBox::up-button:pressed, QDoubleSpinBox::up-button:pressed,
QSpinBox::down-button:pressed, QDoubleSpinBox::down-button:pressed {
    background-color: #D6E4FF;
}

QSpinBox::up-arrow, QDoubleSpinBox::up-arrow {
    image: url(:/images/arrow-up.png);
    width: 10px;
    height: 10px;
}

QSpinBox::down-arrow, QDoubleSpinBox::down-arrow {
    image: url(:/images/arrow-down.png);
    width: 10px;
    height: 10px;
}

QSpinBox::up-arrow:disabled, QSpinBox::up-arrow:off,
QDoubleSpinBox::up-arrow:disabled, QDoubleSpinBox::up-arrow:off,
QSpinBox::down-arrow:disabled, QSpinBox::down-arrow:off,
QDoubleSpinBox::down-arrow:disabled, QDoubleSpinBox::down-arrow:off {
    background-color: #F8F9FA;
    color: #B3C0CF;
}

/* 复选框 */
QCheckBox {
    spacing: 5px;
    color: #2C3E50;
}

QCheckBox::indicator {
    width: 14px;
    height: 14px;
    border: 1px solid #B3C0CF;
    border-radius: 2px;
    background-color: #FFFFFF;
}

QCheckBox::indicator:hover {
    border-color: #3367D6;
}

QCheckBox::indicator:checked {
    background-color: #3367D6;
    border-color: #3367D6;
    image: url(:/images/checkbox-checked.png);
}

QCheckBox::indicator:indeterminate {
    background-color: #3367D6;
    border-color: #3367D6;
    image: none;
}

QCheckBox:disabled {
    color: #B3C0CF;
}

QCheckBox::indicator:disabled {
    background-color: #F8F9FA;
    border-color: #E0E6ED;
}

/* 单选按钮 */
QRadioButton {
    spacing: 5px;
    color: #2C3E50;
}

QRadioButton::indicator {
    width: 14px;
    height: 14px;
    border: 1px solid #B3C0CF;
    border-radius: 7px;
    background-color: #FFFFFF;
}

QRadioButton::indicator:hover {
    border-color: #3367D6;
}

QRadioButton::indicator:checked {
    border: 4px solid #3367D6;
}

QRadioButton:disabled {
    color: #B3C0CF;
}

QRadioButton::indicator:disabled {
    background-color: #F8F9FA;
    border-color: #E0E6ED;
}

/* 下拉框 */
QComboBox {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    padding: 4px 8px;
    min-height: 24px;
    color: #2C3E50;
}

QComboBox:hover {
    border-color: #3367D6;
}

QComboBox:on {
    border-color: #3367D6;
}

QComboBox::drop-down {
    subcontrol-origin: padding;
    subcontrol-position: top right;
    width: 14px;
    border-left: none;
    padding-right: 6px;
}

QComboBox::down-arrow {
    image: url(:/images/arrow-down.png);
    width: 10px;
    height: 10px;
}

QComboBox::down-arrow:on {
    image: url(:/images/arrow-up.png);
}

QComboBox QAbstractItemView {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    selection-background-color: #ECF6FF;
    selection-color: #3367D6;
    outline: none;
    padding: 2px;
}

QAbstractItemView {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    gridline-color: #F0F5FA;
    selection-background-color: #ECF6FF;
    selection-color: #2C3E50;
    alternate-background-color: #F8F9FA;
    outline: none;
}

QAbstractItemView::item {
    padding: 4px 6px;
}

QAbstractItemView::item:selected {
    background-color: #ECF6FF;
    color: #2C3E50;
}

/* 表格视图 - 整行悬停效果 */
QTableView, QListView, QTreeView {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    gridline-color: #F0F5FA;
    selection-background-color: #ECF6FF;
    selection-color: #2C3E50;
    alternate-background-color: #F8F9FA;
    outline: none;
    show-decoration-selected: 1; /* 重要：启用整行选择装饰 */
}

/* 移除单元格悬停样式，使用行级悬停 */
QTableView::item, QListView::item, QTreeView::item {
    padding: 4px 6px;
    border: none; /* 移除单元格边框 */
}

/* 将hover和selected样式应用到整行 */
QTableView::item:selected, QListView::item:selected, QTreeView::item:selected {
    background-color: #ECF6FF;
    color: #2C3E50;
}

/* 添加整行悬停效果 */
QTableView:hover {
    outline: none;
}

/* 使用Qt扩展属性来支持整行悬停 */
QTableView {
    paint-alternating-row-colors-for-empty-area: 1;
    alternate-background-color: #F8F9FA;
}

/* 表格头部视图 - 保留原样 */
QHeaderView {
    background-color: #F0F5FA;
    border: none;
    border-bottom: 1px solid #E0E6ED;
    text-align: left;
    padding: 0px;
}

QHeaderView::section {
    background-color: #F0F5FA;
    color: #5A6A7E;
    font-weight: 500;
    padding: 4px 6px;
    border: none;
    border-right: 1px solid #E0E6ED;
}

QHeaderView::section:last {
    border-right: none;
}

QHeaderView::section:hover {
    background-color: #E8EEF7; /* 添加悬停效果 */
}

/* 进度条 */
QProgressBar {
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    background-color: #F8F9FA;
    text-align: center;
    height: 8px;
}

QProgressBar::chunk {
    background-color: #3367D6;
    border-radius: 2px;
}

QProgressBar[warning="true"]::chunk {
    background-color: #FBBC04;
}

QProgressBar[error="true"]::chunk {
    background-color: #EA4335;
}

/* 滚动条 */
QScrollBar:vertical {
    background-color: #F8F9FA;
    width: 6px;
    margin: 0px;
    border-radius: 3px;
}

QScrollBar::handle:vertical {
    background-color: #B3C0CF;
    min-height: 20px;
    border-radius: 3px;
}

QScrollBar::handle:vertical:hover {
    background-color: #5A6A7E;
}

QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
    height: 0px;
}

QScrollBar:horizontal {
    background-color: #F8F9FA;
    height: 6px;
    margin: 0px;
    border-radius: 3px;
}

QScrollBar::handle:horizontal {
    background-color: #B3C0CF;
    min-width: 20px;
    border-radius: 3px;
}

QScrollBar::handle:horizontal:hover {
    background-color: #5A6A7E;
}

QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {
    width: 0px;
}

/* 选项卡 */
QTabWidget {
    background-color: transparent;
}

QTabWidget::pane {
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    background-color: #FFFFFF;
    top: -1px;
}

QTabBar::tab {
    background-color: transparent;
    color: #5A6A7E;
    padding: 5px 12px;
    border-bottom: 2px solid transparent;
    margin-right: 4px;
    font-weight: 500;
}

QTabBar::tab:selected {
    color: #3367D6;
    border-bottom: 2px solid #3367D6;
}

QTabBar::tab:hover:!selected {
    color: #2C3E50;
    border-bottom: 2px solid #B3C0CF;
}

QScrollArea {
    background-color: transparent;
    border: none;
}

QScrollArea QFrame#client {
    background-color: transparent;
}

/* ================= 功能区样式 ================= */

/* 左侧功能导航区域 */
QFrame#side_bar {
    background-color: #2B3A4A;
    border-right: 1px solid #D9D9D9;
    min-width: 160px;
    max-width: 220px;
    width: 160px;
}

/* 功能按钮列表 */
QPushButton#recorder,
QPushButton#file_analyser,
QPushButton#analyser,
QPushButton#screen_capture,
QPushButton#comparer,
QPushButton#cloud_space,
QPushButton#local_dict,
QPushButton#settings {
    background-color: transparent;
    color: #E0E6ED;
    border-radius: 3px;
    border: none;
    padding: 7px 10px;
    margin: 2px 0px;
}

QPushButton#recorder:hover,
QPushButton#file_analyser:hover,
QPushButton#analyser:hover,
QPushButton#screen_capture:hover,
QPushButton#comparer:hover,
QPushButton#cloud_space:hover,
QPushButton#local_dict:hover,
QPushButton#settings:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
}

QPushButton#recorder:checked,
QPushButton#file_analyser:checked,
QPushButton#analyser:checked,
QPushButton#screen_capture:checked,
QPushButton#comparer:checked,
QPushButton#cloud_space:checked,
QPushButton#local_dict:checked,
QPushButton#settings:checked {
    background-color: #3367D6;
    color: #FFFFFF;
    border: none;
    font-weight: 500;
}

/* 右侧内容区域 */
QStackedWidget#content_panel {
    background-color: #FFFFFF;
    padding: 12px;
}

/* 分隔线 */
QFrame[frameShape="VLine"] {
    color: #D9D9D9;
    width: 1px;
}

QFrame[frameShape="HLine"] {
    color: #D9D9D9;
    height: 1px;
}

yc--ToastLabel {
    background-color: #2B3A4A;
    color: white;
    border-radius: 6px;
    font-size: 12px;
    padding: 10px;
}

yc--LoadingFrame QLabel#text {
    color: #2C3E50;
    font-size: 14px;
}

/* ================= 特定功能区域样式 ================= */

/* 直播数据分析面板 */
#liveDataPanel, QWidget[class="LiveDataView"] {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    padding: 10px;
}

/* 数据图表区域 */
#chartView, QChartView, QWidget[class="ChartWidget"] {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    padding: 12px;
}

/* 数据过滤器 */
#filterPanel, QWidget[class="DataFilter"] {
    background-color: #F8F9FA;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    padding: 8px;
    margin-bottom: 10px;
}

/* 数据表格区域 */
#dataTable, QTableView[class="DataTable"] {
    alternate-background-color: #F8F9FA;
}

/* 直播信息卡片 */
#liveInfoCard, QWidget[class="LiveInfoCard"] {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    padding: 10px;
    margin-bottom: 10px;
}

/* 数据标签 */
QLabel[class="DataLabel"] {
    color: #5A6A7E;
    font-size: 11px;
    font-weight: 500;
}

QLabel[class="DataValue"] {
    color: #2C3E50;
    font-size: 18px;
    font-weight: 600;
}

/* 数据趋势标签 */
QLabel[class="PositiveTrend"] {
    color: #34A853;
    font-weight: 500;
}

QLabel[class="NegativeTrend"] {
    color: #EA4335;
    font-weight: 500;
}

/* 搜索区域 */
#searchBox, QLineEdit[class="SearchInput"] {
    background-color: #F8F9FA;
    border: 1px solid #E0E6ED;
    border-radius: 12px;
    padding: 4px 24px 4px 10px;
    background-image: url(:/images/search-icon.png);
    background-repeat: no-repeat;
    background-position: right center;
    background-origin: content;
    padding-right: 24px;
}

/* 卡片容器 */
QWidget[class="CardContainer"] {
    background-color: #FFFFFF;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* 数据指标卡片 */
QWidget[class="MetricCard"] {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    padding: 10px;
}

/* 仪表板标题 */
QLabel[class="DashboardTitle"] {
    color: #2B3A4A;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* 数据网格 */
QGridLayout[class="DataGrid"] {
    spacing: 8px;
}

/* 时间选择器 */
QDateTimeEdit[class="DateTimePicker"] {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    padding: 4px 8px;
    min-height: 24px;
}

/* 图例标签 */
QLabel[class="ChartLegend"] {
    color: #5A6A7E;
    font-size: 10px;
}

/* 图表工具栏 */
QWidget[class="ChartToolbar"] {
    background-color: #F8F9FA;
    border-bottom: 1px solid #E0E6ED;
    padding: 4px;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

/* 实时指标面板 */
QWidget[class="LiveMetricsPanel"] {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
}

/* 重要数据指标 */
QLabel[class="KeyMetric"] {
    color: #3367D6;
    font-size: 20px;
    font-weight: 600;
}

/* 直播状态指示器 */
QLabel[class="LiveStatusIndicator"] {
    border-radius: 2px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
}

QLabel[class="LiveStatusIndicator"][status="online"] {
    background-color: #E6F4EA;
    color: #34A853;
    border: 1px solid #CEEAD6;
}

QLabel[class="LiveStatusIndicator"][status="offline"] {
    background-color: #F8F9FA;
    color: #5A6A7E;
    border: 1px solid #E0E6ED;
}

QLabel[class="LiveStatusIndicator"][status="ending"] {
    background-color: #FCE8E6;
    color: #EA4335;
    border: 1px solid #FADAD9;
}

/* EditProfileDialog */
EditProfileDialog QPushButton#change_cover_button,
EditProfileDialog QPushButton#change_avatar_button {
    background-color: rgba(0,0,0,25%);
    border: none;
}

/* ChangePasswordDialog */
ChangePasswordDialog QPushButton#current_button,
ChangePasswordDialog QPushButton#new_button,
ChangePasswordDialog QPushButton#confirm_button
{
    margin: 0;
    padding: 0;
    min-width: 0px;
    min-height: 0px;
    width: 16px;
    height: 16px;
    background: transparent;
    border: none;
    image: url(:/images/hide.png);
}

ChangePasswordDialog QPushButton#current_button:hover,
ChangePasswordDialog QPushButton#new_button:hover,
ChangePasswordDialog QPushButton#confirm_button:hover
{
    image: url(:/images/hide-hover.png);
}

ChangePasswordDialog QPushButton#current_button:checked,
ChangePasswordDialog QPushButton#new_button:checked,
ChangePasswordDialog QPushButton#confirm_button:checked
{
    image: url(:/images/show.png);
}

ChangePasswordDialog QPushButton#current_button:checked:hover,
ChangePasswordDialog QPushButton#new_button:checked:hover,
ChangePasswordDialog QPushButton#confirm_button:checked:hover
{
    image: url(:/images/show-hover.png);
}

/* MainView */
MainView {
/*    background-color: #F8F9FA;*/
    background-color: #F9FAFC; /* 略微柔和的背景色 */
}

/* HomeView */
HomeView {
    border-image: url(:/images/Welcome.png);
}

/* LiveRecorderView */
LiveRecorderView > QTableView {
    border: none;
}

LiveRecorderView > QTableView > QHeaderView::section {
    border-right: none;
}

LiveRecorderView QPushButton#captcha_button {
    background-color: #EA4335;
    color: white;
    font-weight: 600;
}

/* MoreItemWidget */
MoreItemWidget QToolButton:hover {
    background-color: transparent;
    border-color: #3367D6;
}

MoreItemWidget QToolButton:pressed {
    background-color: #2A56C6;
}

MoreItemWidget QToolButton:checked {
    background-color: transparent;
}

/* AnalyserView */
AnalyserView QFrame#line {
    background-color: #E0E6ED;
    border: none;
    max-height: 22px;
    max-width: 1px;
    width: 1px;
    height: 20px;
}

AnalyserView QListView::item {
    height: 40px;
}

AnalyserView > QTableView > QHeaderView::section {
    border-right: none;
}

/* ScreenCapture */
ScreenCaptureView QLabel#source_label,
ScreenCaptureView QLabel#audio_label {
    font-weight: 600;
    font-size: 14px;
    color: #2C3E50;
    min-width: 240px;
    width: 240px;
    min-height: 24px;
    padding-top: 4px;
    padding-bottom: 4px;
}

ScreenCaptureView QListView#screen_list {
    max-height: 54px;
}

ScreenCaptureView QLabel#info_label {
    padding-right: 4px;
}

CountdownDialog {
    background-color: rgba(43, 58, 74, 200);
    border-radius: 12px;
}

CountdownDialog QLabel {
    font-size: 120px;
    font-weight: 600;
    color: #FFFFFF;
}

/* SettingsView */
SettingsView QComboBox#audio_sample_rate_combo,
SettingsView QComboBox#audio_bitrate_combo,
SettingsView QComboBox#audio_channels_combo,
SettingsView QComboBox#resolution_combo,
SettingsView QComboBox#video_bitrate_combo,
SettingsView QComboBox#frame_rate_combo {
    min-width: 140px;
    max-width: 140px;
    width: 140px;
}

SettingsView QLineEdit#video_dir_edit,
SettingsView QLineEdit#screen_capture_dir_edit
{
    min-height: 24px;
    height: 24px;
}

CaptchaAssistDialog yc--LoadingFrame
{
    background-color: white;
}

/* ================= 设置页面样式 ================= */
/* 设置标题 */
QLabel[class="settingTitle"] {
    font-weight: 600;
    font-size: 14px;
    color: #2C3E50;
    margin-top: 16px;
    margin-bottom: 8px;
    padding: 0;
}

/* 设置警告标签 */
QLabel[class="warningText"] {
    color: #FF9900;
    font-size: 11px;
}

QLabel[class="errorText"] {
    color: #EA4335;
    font-size: 11px;
}

QLabel[class="successText"] {
    color: #34A853;
    font-size: 11px;
}

/* 磁盘空间信息 */
QLabel[class="diskSpaceInfo"] {
    color: #5A6A7E;
    font-size: 11px;
}

/* 滑块控件 */
QSlider {
    margin: 8px;
}

QSlider::groove:horizontal {
    border: none;
    height: 4px;
    background-color: #E0E6ED;
    border-radius: 2px;
}

QSlider::handle:horizontal {
    background-color: #3367D6;
    border: none;
    width: 16px;
    height: 16px;
    margin: -6px 0;
    border-radius: 8px;
}

QSlider::handle:horizontal:hover {
    background-color: #4285F4;
}

QSlider::handle:horizontal:pressed {
    background-color: #2A56C6;
}

QSlider::add-page:horizontal {
    background-color: #E0E6ED;
    border-radius: 2px;
}

QSlider::sub-page:horizontal {
    background-color: #3367D6;
    border-radius: 2px;
}

QSlider::groove:vertical {
    border: none;
    width: 4px;
    background-color: #E0E6ED;
    border-radius: 2px;
}

QSlider::handle:vertical {
    background-color: #3367D6;
    border: none;
    width: 16px;
    height: 16px;
    margin: 0 -6px;
    border-radius: 8px;
}

QSlider::handle:vertical:hover {
    background-color: #4285F4;
}

QSlider::handle:vertical:pressed {
    background-color: #2A56C6;
}

QSlider::add-page:vertical {
    background-color: #3367D6;
    border-radius: 2px;
}

QSlider::sub-page:vertical {
    background-color: #E0E6ED;
    border-radius: 2px;
}

/* 带刻度的滑块 */
QSlider::groove:horizontal:disabled,
QSlider::sub-page:horizontal:disabled,
QSlider::add-page:horizontal:disabled,
QSlider::groove:vertical:disabled,
QSlider::sub-page:vertical:disabled,
QSlider::add-page:vertical:disabled {
    background-color: #F0F5FA;
}

QSlider::handle:horizontal:disabled,
QSlider::handle:vertical:disabled {
    background-color: #B3C0CF;
}

/* 添加图表区域样式 - 为数据分析提供专门优化 */
QWidget#chartContainer {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 3px;
}

/* 数据卡片样式 - 为关键指标显示优化 */
QFrame#dataCard {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 4px;
    padding: 12px;
}

QLabel#dataTitle {
    color: #5A6A7E;
    font-size: 11px;
    font-weight: 500;
}

QLabel#dataValue {
    color: #2C3E50;
    font-size: 18px;
    font-weight: 600;
}

QLabel#dataPositive {
    color: #34A853;
    font-size: 11px;
}

QLabel#dataNegative {
    color: #EA4335;
    font-size: 11px;
}

/* 降低对比度，减少视觉疲劳 */
QWidget#mainDataArea {
    background-color: #F9FAFC; /* 略微柔和的背景色 */
}

/* 添加深色模式切换支持 */
QWidget[darkMode="true"] {
    background-color: #2C3E50;
    color: #E0E6ED;
}

QWidget[darkMode="true"] QLabel {
    color: #E0E6ED;
}

/* 针对长时间数据监控的表格优化 */
QTableView#monitorTable {
    gridline-color: rgba(224, 230, 237, 0.5); /* 淡化网格线减少视觉干扰 */
    alternate-background-color: rgba(248, 249, 250, 0.5); /* 更柔和的交替行颜色 */
}

/* 为变化的数据添加过渡动画风格支持 */
QLabel#animatedData {
    background-color: transparent;
    border-radius: 2px;
    padding: 2px 4px;
}

QLabel#animatedData[recentChange="true"] {
    background-color: rgba(214, 228, 255, 0.5); /* 淡蓝色背景标识最近变化的数据 */
}

/* 实时数据监控区域 */
QFrame#liveDataSection {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 4px;
    padding: 8px;
}

/* 观众数据指标 */
QLabel#viewerMetric {
    font-size: 14px;
    font-weight: 600;
    color: #2C3E50;
}

QLabel#increasingMetric {
    color: #34A853; /* 上升趋势使用绿色 */
}

QLabel#decreasingMetric {
    color: #EA4335; /* 下降趋势使用红色 */
}

/* 互动热度指标 */
QProgressBar#engagementMeter {
    border: 1px solid #E0E6ED;
    border-radius: 3px;
    background-color: #F8F9FA;
    text-align: center;
    height: 8px;
}

QProgressBar#engagementMeter::chunk {
    background-color: #3367D6;
    border-radius: 2px;
}

QProgressBar#engagementMeter[level="high"]::chunk {
    background-color: #34A853; /* 高互动度使用绿色 */
}

QProgressBar#engagementMeter[level="low"]::chunk {
    background-color: #EA4335; /* 低互动度使用红色 */
}

/* 人气波动图表区域 */
QFrame#trendChart {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 4px;
    padding: 12px;
}

/* 数据筛选器样式 */
QWidget#dataFilterPanel {
    background-color: #F0F5FA;
    border: 1px solid #E0E6ED;
    border-radius: 4px;
    padding: 8px;
}

/* 标签与标注样式 */
QLabel#dataAnnotation {
    color: #3367D6;
    font-size: 11px;
    padding: 2px 6px;
    background-color: #ECF6FF;
    border-radius: 2px;
}

/* 数据比较视图 */
QSplitter#dataCompareView::handle {
    background-color: #E0E6ED;
}

QFrame#compareSide {
    border: 1px solid #E0E6ED;
    border-radius: 3px;
}

QFrame#compareSide[active="true"] {
    border-color: #3367D6;
}

/* 时间轴控件 */
QSlider#timelineSlider {
    height: 24px;
}

QSlider#timelineSlider::groove:horizontal {
    border: none;
    height: 6px;
    background-color: #E0E6ED;
    border-radius: 3px;
}

QSlider#timelineSlider::handle:horizontal {
    background-color: #3367D6;
    width: 12px;
    height: 12px;
    margin: -3px 0;
}

/* 关键时间点标记 */
QFrame#timeMarker {
    background-color: #FBBC04;
    width: 2px;
    border-radius: 1px;
}

/* 数据导出控件优化 */
QPushButton#exportButton {
    padding-left: 8px;
    padding-right: 8px;
}

QPushButton#exportButton QLabel {
    padding-left: 20px; /* 为图标留空间 */
}

/* 筛选和排序菜单 */
QMenu#dataMenu::item {
    padding-left: 24px; /* 为复选框留空间 */
}

QMenu#dataMenu::indicator {
    width: 16px;
    height: 16px;
}

/* 搜索框优化 - 使用Qt支持的属性选择器语法 */
QLineEdit[type="search"] {
    border-radius: 15px;
    padding-left: 24px; /* 为搜索图标留空间 */
    background-image: url(:/icons/search.png);
    background-repeat: no-repeat;
    background-position: left center;
    background-origin: content;
    padding-right: 24px; /* 为清除按钮留空间 */
}

/* 提示信息样式 */
QToolTip {
    background-color: #2C3E50;
    color: #FFFFFF;
    border: none;
    padding: 5px 8px;
    opacity: 220;
    border-radius: 3px;
}

/* 数据导出按钮 - 使用属性选择器 */
QPushButton[purpose="export"] {
    padding-left: 8px;
    padding-right: 8px;
}

/* 数据标注标签 - 使用属性选择器 */
QLabel[role="annotation"] {
    color: #3367D6;
    font-size: 11px;
    padding: 2px 6px;
    background-color: #ECF6FF;
    border-radius: 2px;
}

/* 时间轴滑块 - 使用对象名或属性选择器 */
QSlider[type="timeline"] {
    height: 24px;
}

QSlider[type="timeline"]::groove:horizontal {
    border: none;
    height: 6px;
    background-color: #E0E6ED;
    border-radius: 3px;
}

QSlider[type="timeline"]::handle:horizontal {
    background-color: #3367D6;
    width: 12px;
    height: 12px;
    margin: -3px 0;
}

/* 数据菜单 - 使用属性选择器 */
QMenu[purpose="dataOperations"]::item {
    padding-left: 24px; /* 为复选框留空间 */
}

QMenu[purpose="dataOperations"]::indicator {
    width: 16px;
    height: 16px;
}

/* 数据卡片 - 使用属性而非类 */
QFrame[role="dataCard"] {
    background-color: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 4px;
    padding: 12px;
}

QLabel[role="dataTitle"] {
    color: #5A6A7E;
    font-size: 11px;
    font-weight: 500;
}

QLabel[role="dataValue"] {
    color: #2C3E50;
    font-size: 18px;
    font-weight: 600;
}

QLabel[role="dataPositive"] {
    color: #34A853;
    font-size: 11px;
}

QLabel[role="dataNegative"] {
    color: #EA4335;
    font-size: 11px;
}

/* 时间点标记 */
QFrame[role="timeMarker"] {
    background-color: #FBBC04;
    width: 2px;
    border-radius: 1px;
}
